package com.jinghua.treatment.mapper;

import com.jinghua.treatment.entity.SysInquirySubjectCategory;
import com.jinghua.treatment.entity.SysInquirySubjectCategoryExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysInquirySubjectCategoryMapper {
    int countByExample(SysInquirySubjectCategoryExample example);

    int deleteByExample(SysInquirySubjectCategoryExample example);

    int deleteByPrimaryKey(Integer categoryId);

    int insert(SysInquirySubjectCategory record);

    int insertSelective(SysInquirySubjectCategory record);

    List<SysInquirySubjectCategory> selectByExample(SysInquirySubjectCategoryExample example);
    // 根据三级分类编号列表，查询问诊单详细信息
    List<SysInquirySubjectCategory> selectByAnswers(List<String> answers);

    SysInquirySubjectCategory selectByPrimaryKey(Integer categoryId);
    // 根据模板编号获取一级分类信息列表
    List<SysInquirySubjectCategory> selectLevel1ByTemplate(@Param("templateId") Integer templateId);

    // 根据问诊单编号获取一级分类信息列表
    List<SysInquirySubjectCategory> selectLevel1ByInquiryId(@Param("inquiryId") String inquiryId);

    // 根据父级编码获取二级分类信息列表
    List<SysInquirySubjectCategory> selectLevel2ByTemplate(@Param("parentCode") String parentCode);


    int updateByExampleSelective(@Param("record") SysInquirySubjectCategory record, @Param("example") SysInquirySubjectCategoryExample example);

    int updateByExample(@Param("record") SysInquirySubjectCategory record, @Param("example") SysInquirySubjectCategoryExample example);

    int updateByPrimaryKeySelective(SysInquirySubjectCategory record);

    int updateByPrimaryKey(SysInquirySubjectCategory record);
}